import * as qs from 'qs';

abstract class AbstractEncode{
    protected constructor(public str:string){}

    static encode(code:any):any{return code}

    static decode(code:any):any{return code}

}

export default class Encode extends AbstractEncode{
    constructor(props:string) {
        super(props);
    }

   static encode(code:any){
        return qs.stringify(code);
    }

    static decode(code:any){
        return qs.parse(code);
    }
}